<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
class CronJOb extends CI_Controller {
	
	function __construct()
	{
		parent::__construct();
		$this->load->model('games');
	}
	
	public function index()
	{
		
		$this->load->library('ProsoccerParser');
		$parser= new ProsoccerParser();
		$arrayOfGames = $parser->parseMainPage('http://www.prosoccer.gr');		
		$this->games->insertAllGames($arrayOfGames);		
		$this->load->view('cronJob');
	}
	
}
?>